package com.iphanta.community.following.mapper;

import com.iphanta.community.following.entity.Comments;
import com.iphanta.community.following.traffic.admin.vo.AdminCommentItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 墨声 E-mail: zehong.hongframe.huang@gmail.com
 * create time: 2/17/22 5:39 PM
 */
@Mapper
public interface CommentsMapper {

    int insert(Comments comments);

    List<Comments> selectCommentsByDynamicId(Long dynamicId, @Param("cursor") Long cursor);

    Integer count(@Param("dynamicId") Long dynamicId);

    int deleteComments(Long id);

    List<AdminCommentItem> query(@Param("nickname") String nickname,
                                 @Param("content") String content,
                                 @Param("start") String start,
                                 @Param("stop") String stop,
                                 @Param("timeRange") Boolean timeRange);

}
